package edu.lmu.cs.dhara.roflkode.entities;

import edu.lmu.cs.dhara.util.Log;

/**
 * A break statement signaled by "GTFO".  This statement declares a new entity.
 */
public class GtfoStatement extends Statement {
    private String name;

    /**
     * Creates a declaration statement.
     */
    public GtfoStatement(String n) {
        this.name = n;
    }

    /**
     * Returns the entity being broken.
     */
    public String getName() {
        return name;
    }

    /**
     * Analyzes this statement.
     */
    public void analyze(Log log, SymbolTable table, Function f, boolean inLoop) {
        if (!inLoop) {
        	log.error("break_not_in_loop");
        }
    }
}
